﻿using System.Collections.Generic;
using Labthink.PCSoft.UniversalHost4.Model;
using Labthink.PCSoft.UniversalHost4.Model.Flow;

namespace Labthink.PCSoft.UniversalHost4.Instrument.Model
{
    public class Cup
    {
        public int No { get; set; }
        public bool IsEnable { get; set; }
        public bool IsEnd { get; set; }
        public CupStatus Status { get; set; }
        public TestInfo Info { get; set; }
        public List<FullData> Param { get; set; }
        public List<CupData> Result { get; set; }
        public List<CupData> Datas { get; set; }

        public void Clear()
        {
            //Param.Clear();
            //Param = null;
            foreach (var d in Result)
            {
                d.Datas.Clear();
                d.Datas = null;
            }
            Result.Clear();

            foreach (var d in Datas)
            {
                d.Datas.Clear();
                d.Datas = null;
            }
            Datas.Clear();
        }

        public Cup()
        {
            Result = new List<CupData>();
            Datas = new List<CupData>();
            IsEnable = true;
        }
    }

    public class CupData 
    {
        public List<FullData> Datas { get; set; }
    }

    
    public enum CupStatus
    {
        Disabled,
        Standby,
        Air,
        Testing,
        Ended,
        Exception,
        UnKnown
    }
}
